package com.movie.demo.Utlis.token;

import com.movie.demo.pojo.AdminUser;
import com.movie.demo.pojo.User;

import java.util.HashMap;

public class Tokenobj {
    public Tokenobj(User user) {
    }

    /** 返回带token对象
     * @param user**/
    public static HashMap<String,Object> tokenobj(User user){
        String token=TokenUtlis.sign(user);
        HashMap<String,Object> Tuser=new HashMap<>();
        Tuser.put("user",user);
        Tuser.put("token",token);
        return Tuser;
    }
    public static HashMap<String,Object> tokenobj(AdminUser AdminUser){
        String token=TokenUtlis.sign(AdminUser);
        HashMap<String,Object> Tuser=new HashMap<>();
        Tuser.put("user",AdminUser);
        Tuser.put("token",token);
        return Tuser;
    }
}
